package com.lbtc.exception;

public enum LbtcMallExceptionEnum {

    NEED_USER_NAME(10001,"用户名不能为空"),
    NEED_PASSWORD(10002,"密码不能为空"),
    SYSTEM_ERROR(10003,"系统异常"),
    USER_EXISTED(10004,"用户已经存在"),
    INSERT_FAILED(10005,"插入用户失败"),
    PASSWORD_TOO_LONG_OR_SHORT(10006,"密码长度小于8或者大于16"),
    LOGIN_NOT_EXIT_USERNAME(10007,"用户名不存在"),
    LOGIN_ERROR_PASSWORD(10008,"密码错误"),
    LOGIN_SUCCESS(10009,"登录成功"),
    ERROR_UPDATE(10010,"更新数据失败"),
    NEED_LOGIN(10011,"请先登录"),
    NEED_ADMIN(10012,"需要管理员登录"),
    NAME_EXISTED(10013,"不允许重名"),
    CREATE_FAILED(10014,"创建失败"),
    UPDATE_FAILED(10015,"更新失败"),
    DELETE_FAILED(10016,"删除失败"),
    REQUEST_PARAM_ERROR(10017,"请求参数错误"),
    NOT_SALE(10018, "商品状态不可售"),
    NOT_ENOUGH(10019,"商品库存不足"),

    NOT_PAY(10020,"NOT_PAY"),
    CART_SELECTED_EMPTY(10021,"购物车勾选商品为空"),
    NO_ENUM(10022,"未找到对应订单状态"),
    NO_ORDER(10023,"订单不存在"),
    NOT_YOUR_ORDER(10024,"订单不属于你"),
    WRONG_ORDER_STATUS(10025,"当前订单状态不允许取消");
    //异常编码
    private Integer code;
    //异常描述信息
    private String msg;

    LbtcMallExceptionEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}

